LR Parsing of CFGs with Restrictions
نویسنده
چکیده
SUMMARY A method for extending the LR parsing method to enable it to deal with context free grammars containing imbedded restrictions is presented. Such restrictions are usually dealt with in LR based parsers by executing semantic code outside the context of the LR method. By including such restrictions within the LR method itself, potential shift-reduce and reduce-reduce conflicts can be resolved and provide greater control over the language accepted. The proposed method can be easily incorporated into existing LR based parser generating systems.
منابع مشابه
On the Relation between Context-Free Grammars and Parsing Expression Grammars
Context-Free Grammars (CFGs) and Parsing Expression Grammars (PEGs) have several similarities and a few differences in both their syntax and semantics, but they are usually presented through formalisms that hinder a proper comparison. In this paper we present a new formalism for CFGs that highlights the similarities and differences between them. The new formalism borrows from PEGs the use of pa...
متن کاملTransforming Projective Bilexical Dependency Grammars into efficiently-parsable CFGs with Unfold-Fold
This paper shows how to use the UnfoldFold transformation to transform Projective Bilexical Dependency Grammars (PBDGs) into ambiguity-preserving weakly equivalent Context-Free Grammars (CFGs). These CFGs can be parsed in O(n) time using a CKY algorithm with appropriate indexing, rather than the O(n) time required by a naive encoding. Informally, using the CKY algorithm with such a CFG mimics t...
متن کاملString Shuffling over a Gap between Parsing and Plan Recognition
We propose a new probabilistic plan recognition algorithm YR based on an extension of Tomita’s Generalized LR (GLR) parser for grammars enriched with the shuffle operator. YR significantly outperforms previous approaches based on topdown parsers, shows more consistent run times among similar libraries, and degrades more gracefully as plan library complexity increases. YR also lifts the restrict...
متن کاملDisambiguation Filters for Scannerless Generalized LR Parsers
Several real-world problems call for more parsing power than is offered by the widely used and well-established deterministic parsing techniques. These techniques also create an artificial divide between lexical and context-free analysis phases, at the cost of significant complexity at their interface. In this paper we present the fusion of generalized LR parsing and scannerless parsing. This c...
متن کاملLR Recursive Transition Networks for Earley and Tomita Parsing
Efficient syntactic and semantic parsing for ambiguous context-free languages are generally characterized as complex, specialized, highly formal algorithms. In fact, they are readily constructed from straightforward recursive Iransition networks (RTNs). In this paper, we introduce LR-RTNs, and then computationally motivate a uniform progression from basic LR parsing, to Earley's (chart) parsing...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Softw., Pract. Exper.
دوره 20 شماره
صفحات -
تاریخ انتشار 1990